(gomoku-move-up, gomoku-move-down):
authorRichard M. Stallman <rms@gnu.org>
Mon, 16 Sep 2002 19:29:33 +0000 (19:29 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 16 Sep 2002 19:29:33 +0000 (19:29 +0000)
Use forward-line and move-to-column.

lisp/play/gomoku.el

index 888dfe34ba03a9410c975ffd9e603c0f3e0ac0be..d2333007fd686647c184e76c669addb534ed410c 100644 (file)
@@ -1156,13 +1156,17 @@ If the game is finished, this command requests for another game."
   "Move point down one row on the Gomoku board."
   (interactive)
   (if (< (gomoku-point-y) gomoku-board-height)
-      (next-line gomoku-square-height)))
+      (let ((column (current-column)))
+       (forward-line gomoku-square-height)
+       (move-to-column column))))
 
 (defun gomoku-move-up ()
   "Move point up one row on the Gomoku board."
   (interactive)
   (if (> (gomoku-point-y) 1)
-      (previous-line gomoku-square-height)))
+      (let ((column (current-column)))
+       (forward-line (- 1 gomoku-square-height))
+       (move-to-column column))))
 
 (defun gomoku-move-ne ()
   "Move point North East on the Gomoku board."